#include "qtrack.h"

QTrack::QTrack(QWidget *parent)
	: QWidget(parent)
{
	ui.setupUi(this);
	isSolo=false;
	isRec=false;
	isListen=false;
	isMute=false;
	trackID=0;
}

QTrack::QTrack(QWidget *parent,Manager *manager, int trackID,QComp *comp)
	: QWidget(parent)
{
	ui.setupUi(this);
	isSolo=false;
	isRec=false;
	isListen=false;
	isMute=false;
	compUI=comp;
	this->manager=manager;
	this->trackID=trackID;
}

QTrack::~QTrack()
{

}

void QTrack::setMute(){
	isMute=!isMute;
	manager->setMuteOnTrack(trackID,isMute);
}
void QTrack::setRec(){
	isRec=!isRec;
}
void QTrack::setSolo(){
	isSolo=!isSolo;
}
void QTrack::setListen(){
	isListen=!isListen;
}
void QTrack::showFx(){
	cout<<"OK";
	if(compUI!=NULL){
		//compUI->show();
		//compUI->setCompFX(manager->getTrack(this->trackID)->getDSP(FMOD_DSP_TYPE_COMPRESSOR));
	}
}
void QTrack::setCompUI(QComp* comp){
	compUI=comp;
}

